﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VirtualShopEngineLogic.Helpers
{
    public class Paginator
    {
        private int _pageSize;

        public Paginator(int pageSize)
        {
            _pageSize = pageSize;
        }

        public int GetLastPageNumber(int rowCount, int pageSize)
        {
            return (Int32)(Math.Ceiling(((double)rowCount / pageSize)));
        }

        public int PageSize
        {
            get{return _pageSize;}
        }
    }

}
